Include 5xx responses in default HTTP client error statuses#11156
Include 5xx responses in default HTTP client error statuses#11156saravadeo wants to merge 2 commits intoDataDog:masterfrom
Conversation
937c00a to
2206ee2
Compare
Default client error range was 4xx only, so downstream HTTP spans did not mark 5xx responses as errors. Align defaults with server-side semantics by treating 500-599 as errors unless overridden. Fixes DataDog#10245
2206ee2 to
876a5a1
Compare
|
I don’t have permission to add labels on this repo. Could a maintainer please add the appropriate |
|
👋 @saravadeo thanks for having opened this PR. Unfortunately this default cannot be changed so simply since will result in a breaking change for other customers. The custom behaviour should be done via configuration. |
|
Hey @amarziali 👋 Thanks for the clarification — makes sense that changing the default would be a breaking change. In that case, I’ve updated the issue thread to let the issue owner know that this needs to be handled via configuration on their side, and I’m closing this PR. |
|
Closing per maintainer review: default cannot be changed without a breaking change; use |
Fixes #10245
Default
DEFAULT_HTTP_CLIENT_ERROR_STATUSESnow includes HTTP 5xx so outbound client spans and downstream metrics treat server errors as span errors unless overridden viaDD_TRACE_HTTP_CLIENT_ERROR_STATUSES/DD_HTTP_CLIENT_ERROR_STATUSES.